#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>

void handler(int signo)
{
  printf("get a signal:%d\n", signo);
  printf("signal:SIGABRT\n");
  exit(0);
}

int main()
{
  signal(SIGABRT, handler);
  int count = 5;
  while(count){
    count--;
  printf("I am a process!\n");
  sleep(1);
  }
  
  sleep(1);
  //raise(5);
  //kill(getpid(), SIGTRAP);
  abort();
  return 0;
}
